<script setup lang="ts">
import { onMounted, computed } from 'vue';
import { init } from './utils/system';
import WebLayout from './components/layout/WebLayout.vue';
import { useRoute } from 'vue-router';

onMounted(() => {
    init();
});

const route = useRoute();
const isAuthPage = computed(() => {
    return route.path === '/login';
});
</script>

<template>
    <template v-if="isAuthPage">
        <RouterView />
    </template>
    <template v-else>
        <WebLayout />
    </template>
</template>

<style lang="scss">
@import "@/assets/iconfont.css";

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #323233;
    line-height: 1.5;
}

#app {
    height: 100%;
    width: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}
</style>
